<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>创建车辆信息</title>
<link rel="stylesheet" href="<%=basePath%>ext3.4/resources/css/ext-all.css" type="text/css"></link>
<script type="text/javascript" src="<%=basePath%>ext3.4/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<%=basePath%>ext3.4/ext-all.js"></script>
<script type="text/javascript" src="<%=basePath%>ext3.4/src/locale/ext-lang-zh_CN.js"></script>
<style type="text/css">
	h4{ background:#00afb9; color:#fff; padding-left:15px; line-height:30px; width:490px;}
   	.d_t td{font-size:14px; text-align:left; color:#555; padding-bottom:8px;}
   	.d_t th{font-size:14px; text-align:right; color:#555; padding-bottom:8px;}
	.d_t input{ height:26px;}
	.t_r{padding-left:15px;}
	.btn_1{ width:112px; height:32px; background:url(btn_1.gif) no-repeat 0 0; border:none; font-weight:bold; color:#fff; font-size:14px; margin-top:15px;}
	.btn_1:hover{ background:url(btn_1.gif) no-repeat 0 -33px;}	
	p{text-align:center;}
</style>
<script type="text/javascript">
Ext.onReady(function(){
//编制日期
new Ext.form.DateField({
	emptyText : '请选择编制日期',
	readOnly : false,
	allowBlank : true,
	format : 'Y-m-d',//日期格式
	name : 'prepareDate',
	width:150,
	renderTo:'prepareDate'
});
//购置日期
new Ext.form.DateField({
	emptyText : '请选择购置日期',
	readOnly : false,
	allowBlank : true,
	format : 'Y-m-d',//日期格式
	name : 'acquisitionDate',
	width:150,
	renderTo:'acquisitionDate'
});
//投产日期
new Ext.form.DateField({
	emptyText : '请选择投产日期',
	readOnly : false,
	allowBlank : true,
	format : 'Y-m-d',//日期格式
	name : 'commissioningDate',
	width:150,
	renderTo:'commissioningDate'
});
//车辆单位
new Ext.form.ComboBox({
	store:new Ext.data.JsonStore({
		url:'carInfo/getComboCarUnitList.action',
		fields: ['value'],
		autoLoad:true
	}),
	editable :true,
	mode: 'local',
	displayField:'value',
	valueField:'value',
	triggerAction :'all',
	name:'carUnit',
	renderTo:'carUnit'
});
//类别
new Ext.form.ComboBox({
	store:new Ext.data.JsonStore({
		url:'carInfo/getComboVehicleTypeList.action',
		fields: ['value'],
		autoLoad:true
	}),
	editable :true,
	mode: 'local',
	displayField:'value',
	valueField:'value',
	triggerAction :'all',
	name:'vehicleType',
	renderTo:'vehicleType'
});
//车辆技术等级
new Ext.form.ComboBox({
	store:new Ext.data.JsonStore({
		url:'carInfo/getComboVehicleTechnologyLevelList.action',
		fields: ['value'],
		autoLoad:true
	}),
	editable :true,
	mode: 'local',
	displayField:'value',
	valueField:'value',
	triggerAction :'all',
	name:'vehicleTechnologyLevel',
	renderTo:'vehicleTechnologyLevel'
});
//燃油类型
new Ext.form.ComboBox({
	store:new Ext.data.JsonStore({
		url:'carInfo/getComboFuelTypeList.action',
		fields: ['value'],
		autoLoad:true
	}),
	editable :true,
	mode: 'local',
	displayField:'value',
	valueField:'value',
	triggerAction :'all',
	name:'fuelType',
	renderTo:'fuelType'
});
//客车等级类型
new Ext.form.ComboBox({
	store:new Ext.data.JsonStore({
		url:'carInfo/getComboCarLevelTypeList.action',
		fields: ['value'],
		autoLoad:true
	}),
	editable :true,
	mode: 'local',
	displayField:'value',
	valueField:'value',
	triggerAction :'all',
	name:'carLevelType',
	renderTo:'carLevelType'
});
//使用性质
new Ext.form.ComboBox({
	store:new Ext.data.JsonStore({
		url:'carInfo/getComboUsePropertyList.action',
		fields: ['value'],
		autoLoad:true
	}),
	editable :true,
	mode: 'local',
	displayField:'value',
	valueField:'value',
	triggerAction :'all',
	name:'useProperty',
	renderTo:'useProperty'
});
//车属企业
new Ext.form.ComboBox({
	store:new Ext.data.JsonStore({
		url:'carInfo/getComboCarCompanyList.action',
		fields: ['value'],
		autoLoad:true
	}),
	editable :true,
	mode: 'local',
	displayField:'value',
	valueField:'value',
	triggerAction :'all',
	name:'carCompany',
	renderTo:'carCompany'
});
});
</script>
  </head>
  <body>
  <h4>添加车辆基本信息</h4>
  <div id="dateDiv"></div>
<form action="<%=basePath%>carInfo/addCarBaseInfo.action" method="post">
   <table class="d_t">
   	<tr> <th>车辆单位:</th><td><div id="carUnit"></div></td><th class="t_r">档号:</th><td><input type="text" name="fileNum"/></td> </tr>
   	<tr> <th>自编号码:</th><td><input type="text" name="artificialNum"/></td><th class="t_r">牌照号码:</th><td><input type="text" name="licensePlate"/></td></tr>
   	<tr> <th>编制日期:</th><td><div id="prepareDate"></div></td><th class="t_r">车辆型号:</th><td><input type="text" name="vehicleModel"/></td> </tr>
   	<tr><th>类别:</th><td><div id="vehicleType"></div></td><th class="t_r">道路运输证号:</th><td><input type="text" name="roadTransportNum"/></td></tr>
   	<tr> <th>行驶证号:</th><td><input type="text" name="drivingLicenseNum"/></td><th class="t_r">车辆技术等级:</th><td><div id="vehicleTechnologyLevel"></div></td></tr>
   	<tr> <th>燃油类型:</th><td><div id="fuelType"></div></td><th class="t_r">客车等级类型:</th><td><div id="carLevelType"></div></td> </tr>
   	<tr> <th>使用性质:</th><td><div id="useProperty"></div></td><th class="t_r">购置日期:</th><td><div id="acquisitionDate"></div></td> </tr>
   	<tr> <th>投产日期:</th><td><div id="commissioningDate"></div></td><th class="t_r">发动机号:</th><td><input type="text" name="engineNum"/></td> </tr>
   	<tr> <th>底盘号:</th><td><input type="text" name="turfNum"/></td><th class="t_r">车属企业:</th><td><div id="carCompany"></div></td></tr>
   	<tr> <th>法人:</th><td><input type="text" name="legalPerson"/></td><th class="t_r">电话:</th><td><input type="text" name="legalPersonPhone"/></td> </tr>
   	<tr> <th>车主姓名:</th><td><input type="text" name="carOwner"/></td> <th class="t_r">车主电话:</th><td><input type="text" name="carOwnerPhone"/></td></tr>
   	<tr> <th>居住地址:</th><td colspan="3"><textarea  name="address" style=" width:430px;resize: none;"></textarea></td> </tr>
    <tr><td colspan="4" style=" text-align:center"><input type="submit" value="提交" class="btn_1"/></td></tr>
   </table>
</form>
  </body>
</html>
